import request from '@/utils/request'

// 获取列表详情
export const getPointList = (id = 1) => { return request.get(`/api/vm-service/region/search?pageIndex=${id}&pageSize=10`) }
// 搜索区域列表
export const searchPointList = (city) => { return request.get(`/api/vm-service/region/search?pageIndex=1&pageSize=10&name=${city}`) }
// 新增区域列表
export const pushPointList = (data) => {
  return request.post('/api/vm-service/region/', {
    regionName: data.regionName,
    remark: data.remark
  })
}
// 修改区域列表
export const xgPointList = (data) => {
  console.log(data)
  return request.put(`/api/vm-service/region/${data.id}`, {
    regionName: data.regionName,
    remark: data.remark
  })
}
// 点位搜索
export const searchPoint = (data) => {
  return request.get('/api/vm-service/node/search', {
    params: {
      data
    }
  })
}
// 查看详情
export const SeechPointAll = (id) => {
  return request.get(`/api/vm-service/node/search?pageIndex=1&pageSize=10&regionId=${id}`
  )
}
//                 第二个页面
// 获取列表
export const getList = (data) => {
  return request.get('/api/vm-service/node/search',
    {
      params: {
        ...data
      }
    }

  )
}
// 获取所有的列表
export const getPointListAll = () => { return request.get('/api/vm-service/region/search?pageIndex=1&pageSize=100000') }
// 获取合作商列表
export const getpartner = () => { return request.get('/api/user-service/partner/search?pageIndex=1&pageSize=100000') }
// 商圈列表
export const businessType = () => { return request.get('/api/vm-service/businessType') }
// 新增
export const newList = (data) => { return request.post('/api/vm-service/node', { ...data }) }
// 修改
export const modifyList = (data) => { return request.put('/api/vm-service/node/1', { ...data }) }
// 点位详情

export const pointList = (id) => { return request.get(`api/vm-service/node/vmList/${id}`) }
// 合作商列表获取
export const PartnersList = (data) => {
  return request.get('/api/user-service/partner/search', {
    params: {
      ...data
    }
  })
}
export const newPartList = (data) => { return request.post('/api/user-service/partner', { ...data }) }
// 修改
export const modifyPartList = (data) => { return request.put('/api/user-service/partner/1', { ...data }) }
// 重置密码
export const remake = (id) => { return request.put(`/api/user-service/partner/resetPwd/${id}`) }
